<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcss.com/vue/2.5.17-beta.0/vue.min.js"></script>
</head>
<body>
    <div id="app">
        {{msg}}
        {{id}}
        {{username}}
        {{age}}
        {{sayHello()}}
        <p v-if="flag">
            这是段落1
        </p>
        <p v-show="flag">
            这是段落2
        </p>
        <a :href="href">超链接</a>

        <ul>
            <li v-for="a in arr">{{a}}</li>
        </ul>

    </div>


</body>
<script type="text/javascript">
    new Vue({
        el:"#app",
        data:{
            msg:"HelloWorld",
            id:1,
            username:"郭旭东",
            age:18,
            flag:true,
            href:"https://www.baidu.com",

            arr:['朱玲','穿山岭','郭旭东']

        },
        methods:{
            sayHello:function () {
                return "Say Hello!!"
            }
        }

    })
</script>
</html>